home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL / gluunproject4.z / gluunproject4
Encoding:
Text File  |  2002-10-03  |  5.9 KB  |  129 lines

  1.  
  2.  
  3.  
  4. gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444 - map window and clip coordinates to object coordinates
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      GLint gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444( GLdouble _w_i_n_X,
  14.                           GLdouble _w_i_n_Y,
  15.                           GLdouble _w_i_n_Z,
  16.                           GLdouble _c_l_i_p_W,
  17.                           const GLdouble *_m_o_d_e_l,
  18.                           const GLdouble *_p_r_o_j,
  19.                           const GLint *_v_i_e_w,
  20.                           GLdouble _n_e_a_r,
  21.                           GLdouble _f_a_r,
  22.                           GLdouble* _o_b_j_X,
  23.                           GLdouble* _o_b_j_Y,
  24.                           GLdouble* _o_b_j_Z,
  25.                           GLdouble* _o_b_j_W )
  26.  
  27.  
  28. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  29.      _w_i_n_X, _w_i_n_Y, _w_i_n_Z
  30.                      Specify the window coordinates to be mapped.
  31.  
  32.      _c_l_i_p_W           Specify the clip w coordinate to be mapped.
  33.  
  34.      _m_o_d_e_l           Specifies the modelview matrix (as from a ggggllllGGGGeeeettttDDDDoooouuuubbbblllleeeevvvv
  35.                      call).
  36.  
  37.      _p_r_o_j            Specifies the projection matrix (as from a ggggllllGGGGeeeettttDDDDoooouuuubbbblllleeeevvvv
  38.                      call).
  39.  
  40.      _v_i_e_w            Specifies the viewport (as from a ggggllllGGGGeeeettttIIIInnnntttteeeeggggeeeerrrrvvvv call).
  41.  
  42.      _n_e_a_r, _f_a_r       Specifies the near and far planes (as from a ggggllllGGGGeeeettttDDDDoooouuuubbbblllleeeevvvv
  43.                      call).
  44.  
  45.      _o_b_j_X, _o_b_j_Y, _o_b_j_Z, _o_b_j_W
  46.                      Returns the computed object coordinates.
  47.  
  48. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  49.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444 maps the specified window coordinates _w_i_n_X, _w_i_n_Y and _w_i_n_Z
  50.      and its clip w coordinate _c_l_i_p_W into object coordinates (_o_b_j_X, _o_b_j_Y,
  51.      _o_b_j_Z, _o_b_j_W) using _m_o_d_e_l, _p_r_o_j and _v_i_e_w. _c_l_i_p_W can be other than 1 as for
  52.      vertices in ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr when data type GGGGLLLL____4444DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE is
  53.      returned.  This also handles the case where the _n_e_a_r and _f_a_r planes are
  54.      different from the default, 0 and 1, respectively.  A return value of
  55.      GGGGLLLL____TTTTRRRRUUUUEEEE indicates success; a return value of GGGGLLLL____FFFFAAAALLLLSSSSEEEE indicates failure.
  56.  
  57.      To compute the coordinates (_o_b_j_X, _o_b_j_Y, _o_b_j_Z and _o_b_j_W), gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444
  58.      multiplies the normalized device coordinates by the inverse of _m_o_d_e_l*_p_r_o_j
  59.      as follows:
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444((((3333GGGG))))
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.                    (||||( objWobjZobjYobjX  )||||) = INV(PM)(||||||||(        clipW(far - near)2(winZ - near)______________ - 1view[3]2(winY - view[1])_________________ - 1view[2]2(winX - view[0])_________________ - 1  )||||||||)
  79.  
  80.      INV() denotes matrix inversion.
  81.  
  82.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444 is equivalent to gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt when _c_l_i_p_W is 1, _n_e_a_r is 0
  83.      and _f_a_r is 1.
  84.  
  85. NNNNOOOOTTTTEEEESSSS
  86.      gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt4444 is available only if the GLU version is 1.3 or greater.
  87.  
  88. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  89.      ggggllllGGGGeeeetttt, ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr, gggglllluuuuPPPPrrrroooojjjjeeeecccctttt, gggglllluuuuUUUUnnnnPPPPrrrroooojjjjeeeecccctttt
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                                                         PPPPaaaaggggeeee 2222
  126.  
  127.  
  128.  
  129.